// SETUP

#include intrographics.txt
#include ladyluckbiggraphics.txt

setdatapath("data/graphics/cutscenes/thief/");

var thiefgraphics = {
	idle: {
		animation: "thief_idle.json",
		pack: "thief.pck",
		loop: true
	},
	worried_idle: {
		animation: "thief_worried_idle.json",
		pack: "thief.pck",
		loop: true
	}
}
var thief = addsprite("thief", 1, thiefgraphics);

// HELPER FUNCTIONS	

var fade_time = 0.4;

// ACTORS
actor("Lady Luck", screenwidthmid + 800, 550, Col.YELLOW, CENTER, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
actor("Thief", 2600, 780, Col.multiplylightness(Col.GREEN, 1.25), CENTER, BOTTOM, "chat_thief", "characters/thief/charicon_thief");

// INTRO

play("music_cutscene_lesscheery");

thief.scale = 0.5;
thief.x = 2620 - ((thief.getwidth("idle") * thief.scale) / 2);
thief.y = 890;
changebackground("intro_stage");
fadein();
thief.show("idle");

ladyluck_big.x = -screenwidth;
ladyluck_big.show("idle");
Actuate.tween(ladyluck_big, 2, { x: 0 }).ease(Expo.easeOut);

wait(0.5);

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Welcome back! This episode we’ll be checking in with|our cleverest little cube-boy, the Thief!");
ladyluck_big.show("idle", true);

speak("Thief", "It’ll take more than a few monsters to|keep me from my rightful reward!", "determined");

ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "It’s lovely that you’re still so confident.", "sly");
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking-sly", true);
speak("Lady Luck", "No doubts?", "thinking");
speak("Lady Luck", "No creeping fear that you might have risked it all|only to end up trapped here for eternity?", "sly");
ladyluck_big.show("idle-sly", true);

thief.show("worried_idle");
speak("Thief", "...|no?", "worried");

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Well, I’m very glad to hear it.");
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking-sly", true);
speak("Lady Luck", "I’d wish you luck, but that always seems hypocritical,|given I'm the one handing it out.", "sly");
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking", true);
speak("Lady Luck", "Off you go!");
ladyluck_big.show("idle", true);

startgamefromcutscene();